package com.cqie.secondhandtransaction.controller.params;
import com.cqie.secondhandtransaction.utils.RegexpUtils;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class RegisterParam {

    @NotBlank(message = "用户名不能空")
    private String userName;

    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = RegexpUtils.PASSWORD_REGEX, message = "密码需包含字母、数字、特殊字符，且长度大于6")
    private String password;

    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = RegexpUtils.PHONE_VALIDATE, message = "请输入正确的手机号")
    private String phone;

    @NotBlank(message = "地址不能为空")
    private String address;

    private int role;

}
